package semantic;

import java.util.ArrayList;

public class Errors {
	public static boolean anyErrors = false;
	static ArrayList<String> errors = new ArrayList<String>();
		
	public static void complain(String msg){
		anyErrors = true;
		if(!errors.contains(msg))
			errors.add(msg);
	}
	
	public static void print() {
		if(anyErrors) {
			for(int i=0;i<errors.size();i++)
				System.out.println(errors.get(i));
		}
	}
}

